﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace proyecto
{
    /// <summary>
    /// Lógica de interacción para selectDataWindow.xaml
    /// </summary>
    public partial class selectDataWindow : Window
    {
        private ComboBox select = new ComboBox();
        //private ComboBox selectY = new ComboBox();

        private Boolean selected;

        public selectDataWindow()
        {
            InitializeComponent();
            selected = false;
        }

        public selectDataWindow(string [] names, int n)
        {
            
            InitializeComponent();

            selected = false;

            for (int i = 0; i < n; i++)
            {

                select.Items.Add(names[i]);
                //selectY.Items.Add(names[i]);
            }

            stackPanel1.Children.Add(select);
            
        }     
       
        public int getColumn()
        {
            return select.SelectedIndex;
        }

        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            selected = true;
            this.Close();
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        public Boolean getSelected()
        {
            return selected;
        }

        /*public Boolean getRow()
        {
            return selectY.SelectedIndex;
        }*/

        /*public bool getOpen()
        {
            return open;
        }

        public void setOpen(bool b)
        {
            open = b;
        }*/
    }
}
